#include "Protocol_DNS.h"

CProtocol_DNS::CProtocol_DNS(void)
{
	name = "DNS";
}

CProtocol_DNS::~CProtocol_DNS(void)
{
}

StackUtils::e_Status CProtocol_DNS::Decode( CPacket& packet )
{
	packet.removeElements(0, name.size() + 2);
	packet.removeElements(packet.getBufferContent().size() - (name.size() + 2), name.size() + 2);
	return StackUtils::E_SUCCESS;
}

StackUtils::e_Status CProtocol_DNS::Encode( CPacket& packet )
{
	packet.addFront("[DNS]");
	packet.addBack("[DNS]");
	return StackUtils::E_SUCCESS;
}
